<template>
  <div class="goodsdesc">
    <h3>{{goodsdesc.title}}</h3>
    <hr>
    <div class="goodsdesccontent" v-html="goodsdesc.content" ></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      goodsdesc:{},
      id:this.$route.params.id
    };
  },
  created(){
      this.getgoodsdesc()
  },
  methods:{
      getgoodsdesc(){
          this.$http.get('api/goods/getdesc/'+this.id).then((res)=>{
              console.log(res.body)
              if(res.body.status === 0){
                  this.goodsdesc = res.body.message[0]
              }
          })
      }
  }
}
</script>
<style lang="scss">
  .goodsdesc{
      padding: 5px 10px;
      h3{
          text-align: center;
          color: rgb(226, 130, 130);
           margin: 15px 0;
      }
      .goodsdesccontent{
          p{
              margin: 0;
              padding: 0;
          }
           img{
               width: 100%;

          }
      }
     
  }
</style>